package IO.url;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.net.MalformedURLException;
import java.net.URL;

/**
*
* @author alunolab10
*/
public class leituraUrl {
    public static void main(String[] args) throws IOException {
   try{
       
       URL x = new URL("http://www.uvv.br"); 
       
       BufferedReader br = new BufferedReader(new InputStreamReader(x.openStream()));
       String palavra;        
       
       while((palavra = br.readLine()) != null){
           System.out.println(palavra);
   }
       
       
   }catch(MalformedURLException e){
       System.out.println("nao conseguiu ler a url");
   }  
   
    }
}
